package org.dromara.business.modules.contactForm.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.business.modules.contactForm.domain.BuContactForm;
import org.dromara.business.modules.demands.domain.vo.BuDemandsVo;
import org.dromara.business.modules.merchant.domain.vo.BuMerchantVo;
import org.dromara.business.modules.services.domain.vo.BuServicesVo;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

import java.io.Serial;
import java.io.Serializable;



/**
 * 联系消息视图对象 bu_contact_form
 *
 * @author ckk
 * @date 2025-11-05
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = BuContactForm.class)
public class BuContactFormVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ExcelProperty(value = "主键")
    private Long id;

    /**
     * 分类（0：需求，1：服务）
     */
    @ExcelProperty(value = "分类", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=：需求，1：服务")
    private Integer category;

    /**
     * 外键id
     */
    @ExcelProperty(value = "外键id")
    private Long relatedId;

    /**
     * 内容
     */
    @ExcelProperty(value = "内容")
    private String contactContent;

    /**
     * 附件
     */
    private String attachment;

    /**
     * 附件
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "attachment")
    private String attachmentUrl;

    /**
     * 联系人
     */
    @ExcelProperty(value = "联系人")
    private String contactPerson;

    /**
     * 联系电话
     */
    @ExcelProperty(value = "联系电话")
    private String contactPhone;

    /**
     * 是否已读（0：否，1：是）
     */
    @ExcelProperty(value = "是否已读", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=：否，1：是")
    private Integer hasRead;

    /**
     * 创建者
     */
    private Long createBy;

    /**
     * 关联需求
     */
    private BuDemandsVo demands;

    /**
     * 关联服务
     */
    private BuServicesVo services;

    /**
     * 关联商户
     */
    private BuMerchantVo merchant;


}
